/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.klikmee.sms.core.base.dao;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceException;

import org.springframework.orm.jpa.JpaCallback;

import com.klikmee.sms.core.model.PaymentInvoice;

/**
 * 
 * @author makcro
 */
public class PaymentInvoiceDAO extends AbstractDAO<PaymentInvoice> implements PaymentInvoiceFacadeLocal {

	public PaymentInvoiceDAO() {
		super( PaymentInvoice.class );
	}

	public List<PaymentInvoice> findRange( int[] range ) {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	public int count() {
		throw new UnsupportedOperationException( "Not supported yet." );
	}

	public List<PaymentInvoice> findByState( final Integer state ) {

		return this.entityManager.createNamedQuery( "PaymentInvoice.findByState" ).setParameter( "state", state ).getResultList();
	}
}
